package com.yonyou.iuap.jxzy.entity;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yonyou.iuap.baseservice.bpm.entity.AbsBpmModel;
import com.yonyou.iuap.baseservice.print.entity.Printable;      
import com.yonyou.iuap.baseservice.entity.annotation.Reference;
import com.yonyou.iuap.baseservice.support.condition.Condition;
import com.yonyou.iuap.baseservice.support.condition.Match;
import com.yonyou.iuap.baseservice.support.generator.GeneratedValue;
import com.yonyou.iuap.baseservice.support.generator.Strategy;
import com.yonyou.iuap.baseservice.entity.annotation.CodingEntity;
import com.yonyou.iuap.baseservice.entity.annotation.CodingField;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.math.BigDecimal;

/**
 * 国内废纸验收
 * @date 2019年05月28日 下午04点57分40秒
 */

@JsonIgnoreProperties(ignoreUnknown = true)
@Table(name = "jx_acceptancePaper")

@CodingEntity(codingField="")
public class AcceptancePaper extends AbsBpmModel  implements Serializable,Printable
{
	@Id
	@GeneratedValue
	@Condition
	protected String id;//ID
	@Override
	public String getId() {
		return id;
	}
	@Override
	public void setId(Serializable id){
		this.id= id.toString();
		super.id = id;
	}
	public void setId(String id) {
		this.id = id;
	}

	@Override
	public String getMainBoCode() {
		return "jx_acceptancePaper";
	}
	
	private String planNo;        //计划单号

    public void setPlanNo(String planNo){
        this.planNo = planNo;
    }
    public String getPlanNo(){
        return this.planNo;
    }

	@Condition
	@Column(name="averageImpurityWeight")
	private double averageImpurityWeight;        //平均含杂质重

	public double getAverageImpurityWeight() {
		return averageImpurityWeight;
	}
	public void setAverageImpurityWeight(double averageImpurityWeight) {
		this.averageImpurityWeight = averageImpurityWeight;
	}

	@Condition
	@Column(name="averageUnit")
	private double averageUnit;        //平均价

	public double getAverageUnit() {
		return averageUnit;
	}
	public void setAverageUnit(double averageUnit) {
		this.averageUnit = averageUnit;
	}

	@Condition
	@Column(name="averageDewateringWeight")
	private double averageDewateringWeight;        //平均扣水分重

	


	public double getAverageDewateringWeight() {
		return averageDewateringWeight;
	}
	public void setAverageDewateringWeight(double averageDewateringWeight) {
		this.averageDewateringWeight = averageDewateringWeight;
	}

	@Condition
	@Column(name="materialVariety")
	private String materialVariety;        //物料品种

	public void setMaterialVariety(String materialVariety){
		this.materialVariety = materialVariety;
	}
	public String getMaterialVariety(){
		return this.materialVariety;
	}

	private String materialName;        //物料名称

	public String getMaterialName() {
		return materialName;
	}
	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	@Condition
	@Column(name="averageImpurityRatio")
	private double averageImpurityRatio;        //平均含杂质比

	public double getAverageImpurityRatio() {
		return averageImpurityRatio;
	}
	public void setAverageImpurityRatio(double averageImpurityRatio) {
		this.averageImpurityRatio = averageImpurityRatio;
	}

	@Condition
	@Column(name="returnGoodsReason")
	private String returnGoodsReason;        //退货原因

	public void setReturnGoodsReason(String returnGoodsReason){
		this.returnGoodsReason = returnGoodsReason;
	}
	public String getReturnGoodsReason(){
		return this.returnGoodsReason;
	}


	@Condition
	@Column(name="pk_material")
	private String pk_material;        //物料PK

	public void setPk_material(String pk_material){
		this.pk_material = pk_material;
	}
	public String getPk_material(){
		return this.pk_material;
	}


	@Condition
	@Column(name="returnGoods")
	private String returnGoods;        //退货

	public void setReturnGoods(String returnGoods){
		this.returnGoods = returnGoods;
	}
	public String getReturnGoods(){
		return this.returnGoods;
	}


	@Condition
	@Column(name="goodsName")
	private String goodsName;        //货物名称

	public void setGoodsName(String goodsName){
		this.goodsName = goodsName;
	}
	public String getGoodsName(){
		return this.goodsName;
	}


	@Condition
	@Column(name="pk_inspector")
	private String pk_inspector;        //检验员pk

	public void setPk_inspector(String pk_inspector){
		this.pk_inspector = pk_inspector;
	}
	public String getPk_inspector(){
		return this.pk_inspector;
	}


	@Condition
	@Column(name="waterRatioArtificial")
	private double waterRatioArtificial;        //含水分比-人工(%)

	public double getWaterRatioArtificial() {
		return waterRatioArtificial;
	}
	public void setWaterRatioArtificial(double waterRatioArtificial) {
		this.waterRatioArtificial = waterRatioArtificial;
	}


	@Condition
	@Column(name="waterRatioMeter")
	private double waterRatioMeter;        //含水分比-测水仪(%)

	public double getWaterRatioMeter() {
		return waterRatioMeter;
	}
	public void setWaterRatioMeter(double waterRatioMeter) {
		this.waterRatioMeter = waterRatioMeter;
	}

	@Condition
	@Column(name="isCancel")
	private String isCancel;        //是否重检

	public void setIsCancel(String isCancel){
		this.isCancel = isCancel;
	}
	public String getIsCancel(){
		return this.isCancel;
	}


	private String isReinspection; //是否重检前端




	public String getIsReinspection() {
		return isReinspection;
	}
	public void setIsReinspection(String isReinspection) {
		this.isReinspection = isReinspection;
	}


	@Condition
	@Column(name="buckleWaterWeight")
	private String buckleWaterWeight;        //扣水分重(吨)

	public void setBuckleWaterWeight(String buckleWaterWeight){
		this.buckleWaterWeight = buckleWaterWeight;
	}
	public String getBuckleWaterWeight(){
		return this.buckleWaterWeight;
	}


	@Condition
	@Column(name="impurityWeight")
	private String impurityWeight;        //扣杂质重(吨)

	public void setImpurityWeight(String impurityWeight){
		this.impurityWeight = impurityWeight;
	}
	public String getImpurityWeight(){
		return this.impurityWeight;
	}


	@Condition
	@Column(name="inspector")
	private String inspector;        //检验员

	public void setInspector(String inspector){
		this.inspector = inspector;
	}
	public String getInspector(){
		return this.inspector;
	}

	private String inspectorName; //检验员名称



	public String getInspectorName() {
		return inspectorName;
	}
	public void setInspectorName(String inspectorName) {
		this.inspectorName = inspectorName;
	}


	@Condition
	@Column(name="checkPoint")
	private String checkPoint;        //检验点

	public void setCheckPoint(String checkPoint){
		this.checkPoint = checkPoint;
	}
	public String getCheckPoint(){
		return this.checkPoint;
	}

	private String checkPointName;  //检验名称

	public String getCheckPointName() {
		return checkPointName;
	}
	public void setCheckPointName(String checkPointName) {
		this.checkPointName = checkPointName;
	}
	
	@Condition
	@Column(name="checkPointpk")
	private String checkPointpk;  //检验点pk
	public String getCheckPointpk() {
		return checkPointpk;
	}
	public void setCheckPointpk(String checkPointpk) {
		this.checkPointpk = checkPointpk;
	}

	@Condition
	@Column(name="inspectorTime")
	private String inspectorTime;        //检验时间

	public String inspectorTime() {
		return inspectorTime;
	}
	public void setInspectorTime(String inspectorTime) {
		this.inspectorTime = inspectorTime;
	}


	@Condition
	@Column(name="serialNo")
	private String serialNo;        //序列号

	public void setSerialNo(String serialNo){
		this.serialNo = serialNo;
	}
	public String getSerialNo(){
		return this.serialNo;
	}


	private String imgUrl;        

	private String[] imgUrls;//图片路径 iuap




	public String getImgUrl() {
		return imgUrl;
	}
	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
	public String[] getImgUrls() {
		return imgUrls;
	}
	public void setImgUrls(String[] imgUrls) {
		this.imgUrls = imgUrls;
	}


	@Condition
	@Column(name="unit")
	private BigDecimal unit;        //单价

	public void setUnit(BigDecimal unit){
		this.unit = unit;
	}
	public BigDecimal getUnit(){
		return this.unit;
	}


	@Condition
	@Column(name="averageWaterRatio")
	private double averageWaterRatio;        //平均含水分比

	public double getAverageWaterRatio() {
		return averageWaterRatio;
	}
	public void setAverageWaterRatio(double averageWaterRatio) {
		this.averageWaterRatio = averageWaterRatio;
	}

	@Condition
	@Column(name="impurityRatio")
	private double impurityRatio;        //含杂质比(%)

	public double getImpurityRatio() {
		return impurityRatio;
	}
	public void setImpurityRatio(double impurityRatio) {
		this.impurityRatio = impurityRatio;
	}

	@Condition
	@Column(name="modifierReason")
	private String modifierReason;        //重检原因

	public void setModifierReason(String modifierReason){
		this.modifierReason = modifierReason;
	}
	public String getModifierReason(){
		return this.modifierReason;
	}


	@Condition
	@Column(name="inspectedPersonNo")
	private String inspectedPersonNo;        //已检人数

	public void setInspectedPersonNo(String inspectedPersonNo){
		this.inspectedPersonNo = inspectedPersonNo;
	}
	public String getInspectedPersonNo(){
		return this.inspectedPersonNo;
	}


	@Condition
	@Column(name="modifierName")
	private String modifierName;        //修改人姓名

	public void setModifierName(String modifierName){
		this.modifierName = modifierName;
	}
	public String getModifierName(){
		return this.modifierName;
	}

	@Condition
	@Column(name="heapNo")
	private String heapNo;        //堆号

	public String getHeapNo() {
		return heapNo;
	}
	public void setHeapNo(String heapNo) {
		this.heapNo = heapNo;
	}

	private String heapName;	//堆号名称



	public String getHeapName() {
		return heapName;
	}
	public void setHeapName(String heapName) {
		this.heapName = heapName;
	}


	@Condition
	@Column(name="material_code")
	private String material_code;        //物料编码

	public void setMaterial_code(String material_code){
		this.material_code = material_code;
	}
	public String getMaterial_code(){
		return this.material_code;
	}

	@Condition
	@Column(name="unpackNo")
	private String unpackNo;//开包件数

	@Condition
	@Column(name="qualityGrade")
	private String qualityGrade;//质量等级

	@Condition
	@Column(name="forkliftNo")
	private String forkliftNo;//叉车工工号


	private String forkliftWorkerNo;//叉车工工号  iuap 前端

	public String getForkliftWorkerNo() {
		return forkliftWorkerNo;
	}
	public void setForkliftWorkerNo(String forkliftWorkerNo) {
		this.forkliftWorkerNo = forkliftWorkerNo;
	}


	@Condition
	@Column(name="vdef5")
	private String vdef5;//序列号

	@Condition
	@Column(name="DR")
	private Integer DR;

	/**
	 * 
	 * @return
	 */
	@Condition
	@Column(name="vdef3")
	private String vdef3;//总包数

	@Condition
	@Column(name="vdef4")
	private String vdef4;//加抽位置

	@Condition
	@Column(name="vdef6")
	private String vdef6;//抽样位置 磅单表

	@Condition
	@Column(name="name")
	private String name;//部门名称

	@Condition
	@Column(name="pk_org")
	private String pk_org;//组织

	private String cmaterialid;//组织   levm_matervarietyprice

	@Condition
	@Column(name="firstData")
	private String firstData;//是否为第一条数据

	private String vbillcode;//磅单号
	
	private String vdef1;//收货通知单 计划单号
	
	private String vbdef18;//是否人工检测
	
	private String pk_poundbill;//磅单主键
	
	
	public String getPk_poundbill() {
		return pk_poundbill;
	}
	public void setPk_poundbill(String pk_poundbill) {
		this.pk_poundbill = pk_poundbill;
	}
	public String getVbdef18() {
		return vbdef18;
	}
	public void setVbdef18(String vbdef18) {
		this.vbdef18 = vbdef18;
	}
	public String getVdef1() {
		return vdef1;
	}
	public void setVdef1(String vdef1) {
		this.vdef1 = vdef1;
	}
	public String getVbillcode() {
		return vbillcode;
	}
	public void setVbillcode(String vbillcode) {
		this.vbillcode = vbillcode;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return Objects.hashCode(serialNo);
	}

	@Override
	public boolean equals(Object obj) {
		if (this==obj) return true;
		if (this==null && getClass()!=obj.getClass()) return false;
		AcceptancePaper acceptancePaper=(AcceptancePaper) obj;
		return Objects.equals(serialNo,acceptancePaper.serialNo);
	}



	public String getFirstData() {
		return firstData;
	}
	public void setFirstData(String firstData) {
		this.firstData = firstData;
	}
	public Integer getDR() {
		return DR;
	}
	public void setDR(Integer dR) {
		DR = dR;
	}
	public String getCmaterialid() {
		return cmaterialid;
	}
	public void setCmaterialid(String cmaterialid) {
		this.cmaterialid = cmaterialid;
	}
	public String getVdef3() {
		return vdef3;
	}
	public void setVdef3(String vdef3) {
		this.vdef3 = vdef3;
	}
	public String getVdef4() {
		return vdef4;
	}
	public void setVdef4(String vdef4) {
		this.vdef4 = vdef4;
	}
	public String getVdef6() {
		return vdef6;
	}
	public void setVdef6(String vdef6) {
		this.vdef6 = vdef6;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPk_org() {
		return pk_org;
	}
	public void setPk_org(String pk_org) {
		this.pk_org = pk_org;
	}
	public String getVdef5() {
		return vdef5;
	}
	public void setVdef5(String vdef5) {
		this.vdef5 = vdef5;
	}
	public String getUnpackNo() {
		return unpackNo;
	}
	public void setUnpackNo(String unpackNo) {
		this.unpackNo = unpackNo;
	}
	public String getQualityGrade() {
		return qualityGrade;
	}
	public void setQualityGrade(String qualityGrade) {
		this.qualityGrade = qualityGrade;
	}
	public String getForkliftNo() {
		return forkliftNo;
	}
	public void setForkliftNo(String forkliftNo) {
		this.forkliftNo = forkliftNo;
	}
	public String getInspectorTime() {
		return inspectorTime;
	}
	@Override
	public String getBpmBillCode() {
		return  DateUtil.format(new Date(), "yyyyMMddHHmmss"+new Random().nextInt(10))   ;
	}

}




